home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / d_b_a / 87_01 / stub.prg < prev    next >
Text File  |  1986-12-05  |  1KB  |  41 lines

  1. *
  2. * Copyright 1986, Data Based Solutions, Inc.
  3. * All Rights Reserved
  4. *
  5. SET TALK OFF
  6. SET PROCEDURE TO validate.prg
  7. CLEAR
  8. * main program stub for calling the GETFILE validation routines
  9. * contained in procedure "validate.prg"
  10.  
  11. * set up the file, since one example validates the entry is on file
  12. USE FK customer.dbf INDEX name.ndx
  13.  
  14. * set up default values for each field to be entered, followed by the
  15. * validation information for the field that will be passed to the
  16. * GETFILE.
  17. STORE "IN" TO y.state
  18. * the stateval.prg GETFILE needs no validation variable
  19. STORE "APPLE " TO y.fruit
  20. STORE "APPLE |ORANGE|PEAR  " TO y.fruitx
  21. STORE SPACE(10) TO y.name
  22. STORE "FK" TO y.namex
  23. STORE 1.25 TO y.price
  24. STORE "0.01|9.99" TO y.pricex
  25.  
  26. * GET the `y.state' field, using the stateval.prg GETFILE routine to
  27. * validate the field's entry
  28.  
  29. @ 10,10 SAY "Enter the state " GET y.state PICTURE "!!" ;
  30.         GETFILE stateval.prg
  31. * GET the `y.fruit' field, using the strngval.prg GETFILE routine and
  32. * the information in `y.fruitx' to validate the field's entry
  33. @ 11,10 SAY "Enter the fruit " GET y.fruit PICTURE "!!!!!!" ;
  34.         GETFILE strngval.prg
  35. @ 12,10 SAY "Enter the name  " GET y.name  PICTURE "!!!!!!!!!!" ;
  36.         GETFILE fileval.prg
  37. @ 13,10 SAY "Enter the price " GET y.price PICTURE "99.99" ;
  38.         GETFILE range.prg
  39. READ
  40. RETURN
  41.